﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using Xpus.Website.Configuration;
using Xpus.Website.Core.Membership;
using Xpus.Website.Data;
using Xpus.Website.Utilities;
using System.Text.RegularExpressions;

public partial class _Default : System.Web.UI.Page
{
	protected void Page_Load(object sender, EventArgs e)
	{
		if(!IsPostBack)
		{
			User u = ((XpusUserPrincipal)Context.User).User;
			lblMsg.Text = string.Format(
				"UserName={0};SecurityEmail={1}",
				u.UserName, u.SecurityEmail);


			lblMsg.Text += "<br/><br/>";
			Regex reg = RegexUtility.GetRegex("Email");
			lblMsg.Text += reg.ToString();
			lblMsg.Text += "<br/><br/>";
			reg = RegexUtility.GetRegex("HtmlTag");
			lblMsg.Text += reg.ToString();
			lblMsg.Text += "<br/><br/>";
			reg = RegexUtility.GetRegex("TwoDigits");
			lblMsg.Text += reg.ToString();
			lblMsg.Text += "<br/><br/>";
			reg = RegexUtility.GetRegex("FourDigits");
			lblMsg.Text += reg.ToString();
			lblMsg.Text += "<br/><br/>";
		}
	}
	protected void btnLogout_Click(object sender, EventArgs e)
	{
		FormsAuthentication.SignOut();
		Response.Redirect(Request.RawUrl);
	}
}
